import Taro, { Component } from '@tarojs/taro'
import classNames from 'classnames'
import PropsType from 'prop-types'
import { View, Image } from '@tarojs/components'
import '../styles/lookimages.scss'
const _status = []
class DLookImages extends Component {

    onLookHandle() {
        this.props.onLookHandle && this.props.onLookHandle()
    }


    render() {
        const {
            className,
            status,
            url = require('../assete/enterprise.png')
        } = this.props
        return (
            status ? <View className={classNames('b_lookimages', className)} onClick={this.onLookHandle.bind(this)}>
                {
                    url && <Image src={url} className='b_lookimages__item'></Image>
                }
            </View> : ''
        )
    }
}

DLookImages.defaultProps = {
    className: '',
    url: '',
    status: false,
    onLookHandle: () => { }
}

DLookImages.PropsType = {
    className: PropsType.oneOfType[PropsType.string, PropsType.object],
    url: PropsType.string,
    status: PropsType.bool,
    onLookHandle: PropsType.func
}

export default DLookImages